Index Parent

Picture class


The Picture class is used to display datatype pictures.

Of course, you may give a Picture object a frame, a background and an inputmode, to make it act like a button.

Note that disabling a Picture object is not supported in this release, so if you need to disable a Picture object, just incapsulate it in a group.

Picture.rxmec was written with the intention to completly solve all the pictures showing related problems.

I might say that if your picture is not shown fine with Picture.rxmec, you should change your datatype :-)

 

ATTRIBUTES
Name Type Class Note
BitmapCompression N G The compression scheme of the picture
BitmapDepth N G The number of the bitplanes of the picture
BitmapHeight N G The real height of the picture
BitmapMasking N G The masking type of the picture, one of:
  • 0 - None
  • 1 - Mask
  • 2 - Transparent color
  • 3 - Lasso
  • 4 - Alpha
Note that Transparent is usable iff this is not 0
BitmapTransparent N G The transparent color, if BitMasking is 2
BitampWidth N G The real width of the picture
BitmapXAspect N G  
BitmapYAspect N G  
Center B ISGN Set HCenter and VCenter
FreeHoriz B I The picture is horizontal unlimited (free)
FreeVert B I The picture is vertical unlimited (free)
HCenter B ISGN If the object is FreeHoriz, or it has a FixWidth set, it is horiz centered in the space it belongs to
Pic N I Many datatypes give the chance to select the picture number to show, in the case of a multi image. It is the integral id of the image (0,...)
Precision S I One of:
  • Exact
  • Image
  • Icon
  • Gui
Scale N ISGN Sperimental scale factor. It is a postive value, percent factor for scaling. It works with all datatypes but ilbm (scaled ilbm are shown with wrong colors lol).
ScaledWidth N G Width of the scaled image
ScaledHeight N G Height of the scaled image
Source S I ND The source of data. See SourceType. Note that this attribute have to be always supplied.
SourceType S I One of:
  • File - Source is a file name (default)
  • Mem - Source is string containing the pic data It may obtained via p2s.rexx macro. Note that because of Datatypes fail to support that, it is implemented via a dummy file in directory t:; the file is deleted at object disposing
  • Clipboard - Source is the clipboard unit number
Transparent B ISGN If the picture has an alpha mask or a transparent color, it makes that transparent
VCenter B ISGN If the object is FreeVert, or it has a FixHeight set, it is vert centered in the space it belongs to

 

Note that:

  1. Source have to be always supplied
  2. SourceType is File by default
  3. You may supplied the Area class attribute FixWidth, FixHeight to hard set the dimension of the object
  4. If you want to open a picture with its real dimension, do not supply any of FreeHoriz, FreeVert, FixedWidth, FixedHeight

 

METHODS
Name Parameters Note
CopyToClip   Copy the picture (the whole picture not the scaled one) to the clipboard unit 0